/**
 *
 * @author Bora SAYINER
 * @since Dec 28, 2014 11:58:38 AM
 * @version 1.0
 */
public class Chronometer extends Thread {

	@Override
	public void run() {
		long begin = System.currentTimeMillis();
		while (true) {
			System.out.println("Thread ID: " + Thread.currentThread().getId());
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			long now = System.currentTimeMillis();
			System.out.println((now - begin) / 1000);
		}
	}
}
